/** When your routing table is too long, you can split it into small modules **/

import Layout from '@/layout'

const paymentRouter = {
  path: '/views/paymentManage',
  component: Layout,
  //当设置 noRedirect 的时候该路由在面包屑导航中不可被点击
  redirect: 'noRedirect',
  // alwaysShow: true, //一直显示根路由
  name: 'paymentManage',
  meta: {
    title: '收付管理',
    icon: 'payment',
    roles: ['admin', 'user']
  }, //你可以在根路由设置权限，这样它下面所有的子路由都继承了这个权限
  children: [
    {
      path: '/views/paymentManage/paymentBill',
      component: () => import('@/views/paymentManage/paymentBill/index'),
      //当设置 noRedirect 的时候该路由在面包屑导航中不可被点击
      redirect: 'noRedirect',
      // alwaysShow: true, //一直显示根路由
      meta: {
        title: '单据',
        roles: ['admin', 'user']
      }, //你可以在根路由设置权限，这样它下面所有的子路由都继承了这个权限
      children: [{
          path: '/views/paymentManage/paymentBill/billCollectionSettlement',
          component: () => import('@/views/paymentManage/paymentBill/billCollectionSettlement'), // 收款结算单
          name: 'billCollectionSettlement',
          meta: {
            title: '收款结算单',
            roles: ['admin', 'user']
          }
        },
        {
          path: '/views/paymentManage/paymentBill/billPaymentSettlement',
          component: () => import('@/views/paymentManage/paymentBill/billPaymentSettlement'), // 付款结算单
          name: 'billPaymentSettlement',
          meta: {
            title: '付款结算单',
            roles: ['admin', 'user']
          }
        },
      ]
    },
    {
      path: '/views/paymentManage/paymentRecord',
      component: () => import('@/views/paymentManage/paymentRecord/index'),
      //当设置 noRedirect 的时候该路由在面包屑导航中不可被点击
      redirect: 'noRedirect',
      // alwaysShow: true, //一直显示根路由
      meta: {
        title: '记录',
        roles: ['admin', 'user']
      }, //你可以在根路由设置权限，这样它下面所有的子路由都继承了这个权限
      children: [{
          path: '/views/paymentManage/paymentRecord/receivables',
          component: () => import('@/views/paymentManage/paymentRecord/receivables'), // 应收款管理
          name: 'receivables',
          meta: {
            title: '应收款管理',
            roles: ['admin', 'user']
          }
        },
        {
          path: '/views/paymentManage/paymentRecord/payable',
          component: () => import('@/views/paymentManage/paymentRecord/payable'), // 应付款管理
          name: 'payable',
          meta: {
            title: '应付款管理',
            roles: ['admin', 'user']
          }
        },
      ]
    },
    {
      path: '/views/reportStatistics/arAndapReport',
      component: () => import('@/views/reportStatistics/arAndapReport/index'),
      //当设置 noRedirect 的时候该路由在面包屑导航中不可被点击
      redirect: 'noRedirect',
      // alwaysShow: true, //一直显示根路由
      meta: {
        title: '统计',
        roles: ['admin', 'user']
      }, //你可以在根路由设置权限，这样它下面所有的子路由都继承了这个权限
      children: [{
          path: '/views/reportStatistics/arAndapReport/arAndapSummary',
          component: () => import('@/views/reportStatistics/arAndapReport/arAndapSummary'),// 应收应付汇总表
          name: 'arAndapSummary',
          meta: {
            title: '应收应付汇总表',
            roles: ['admin', 'user']
          }
        },
        {
          path: '/views/reportStatistics/arAndapReport/accountsReceivable',
          component: () => import('@/views/reportStatistics/arAndapReport/accountsReceivable'), // 应收款汇总表
          name: 'accountsReceivable',
          meta: {
            title: '应收款汇总表',
            roles: ['admin', 'user']
          }
        },
        {
          path: '/views/reportStatistics/arAndapReport/accountsPayable',
          component: () => import('@/views/reportStatistics/arAndapReport/accountsPayable'), // 应付款汇总表
          name: 'accountsPayable',
          meta: {
            title: '应付款汇总表',
            roles: ['admin', 'user']
          }
        },
        {
          path: '/views/reportStatistics/paymentReport/billQuery',
          component: () => import('@/views/reportStatistics/paymentReport/billQuery'), // 单据查询
          name: 'billQuery',
          meta: {
            title: '单据查询',
            roles: ['admin', 'user']
          }
        },
      ]
    },
  ]
}
export default paymentRouter
